<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Đăng nhập</title>
<style>
.new_style_form_login {
	background: url(image/loginbanner.png) no-repeat scroll center top transparent;
	height: 480px;
	left: 15%;
	margin: 10px auto;
	padding: px 0;
	position: absolute;
	width: 70%;
	top: 17px;
}
.style2{
font-weight:bolder;
color:#FFFFFF;
width:80px;
display:inline;
}
.style3{
padding:0 0 5px 0;
}
.style4{
width:450px;
margin:80px auto auto 340px;
font-size:14px;
color:#FFFFFF;

}



</style>
<!-- <script type="text/javascript" src="slide/scripts/jquery-1.4.3.min.js"></script>-->
  <script type="text/javascript" src="validate.js"></script>
  <script type="text/javascript" src="md5.js"></script>

<script type="text/javascript">
           
            $(document).ready(function() {
                $("form input").keypress(function (e) {
                    if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
                        $("#btn_login").click();
                        return false;
                    } else {
                        return true;
                    }
                });
            });
            function convertToMD5(){
              var plaintext = document.getElementById('idpassword').value;
              document.getElementById('idpassword').value = hex_md5(plaintext);
//                alert(hex_md5('hung'));
            }
            

        </script>
</head>

<body vlink="#0000cc" text="#000000" bgcolor="#ffffff" alink="#0000cc" link="#0000cc">
    <form action="login" name="login"  class="new_style_form_login" method="post" onsubmit=" convertToMD5()">
<div class="style4">
<ul>
<li>Nếu bạn là khách hàng cũ của chúng tôi, vui lòng đăng nhập với tài khoản đã đăng ký.</li>
<li>Nếu bạn quên mật khẩu, Vui lòng dùng chức năng quên mật khẩu.</li>
<li>Nếu bạn là khách hàng mới, Vui lòng đăng kí tại đâu</li>
</ul>
</div>
<table width="270px" border="0" cellspacing="0" cellpadding="5" style="margin:-2px auto auto 340px;">
  <tr>
      <input type="hidden" name="pay" value="<%=request.getAttribute("pay")%>"/>
                 <%

                            String error = (String) request.getAttribute("errorlogin");

                %>
    <td class="style2"> User name:</td>
    <td class="style3" >
        <input size="20" name="username" type="text" style="width:180px;"/>
    </td>
  </tr>
  <tr>
    <td class="style2">Password:</td>
    <td class="style3"><input size="20" name="password"  type="password" id="idpassword"style="width:180px;"/></td>
  </tr>
  <tr>

    <td align="right" colspan="2"><div><div style="width:200px;float:left;text-align:left;color:white;">
               <%if(error!=null){%>
                    <div style="padding:0 10px;color:red"><%=error%></div>
                    <%}%>
            </div><div style="width:auto; float:right;"> <input class="button" name="btn_login" id="btn_login" value="Login"  type="submit"
                       /></div></div>

      </td>
  </tr>
      
</table>


</form>
</body>
</html>

